compare

open fun compare(a: Double, b: Double): Int(source)

Compares two double values considering the defined precision.

Return

0 if the values are considered equal, -1 if a is less than b, and 1 if a is greater than b.

Parameters

a

The first double value to compare.

b

The second double value to compare.